<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //任意三个数的和
        //多个参数之间用逗号隔开
        function getsum(num1, num2, num3) {
            console.log(num1 + num2 + num3);
        }
        getsum(3, 4, 5);

        //任意一个数到另一个数之间的累加和
        function getsum1(start, end) {
            var sum1 = 0;
            for (i = start; i <= end; i++) {
                sum1 += i;
            }
            console.log(sum1);
        }
        getsum1(1, 100);
    </script>
</head>

<body>

</body>

</html>